package com.kedacom.demo.redis.springdataredis;

import org.springframework.stereotype.Repository;

import com.kedacom.demo.utils.HashSerializer;

/**
 * UserRedisDao
 * @author luocanfeng
 * @date 2015年9月1日
 */
@Repository
public class UserRedisDao extends BaseRedisDao {

	private static final String user_key_prefix = "/user/";

	public void save(final User user) {
		String key = user_key_prefix + user.getId();
		super.hMSet(key, HashSerializer.toMap(user));
	}

}
